/* $Id: AppMetaDataDAO.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */

package ae.pcfc.etks.online.common.dao;

import java.util.List;

import ae.pcfc.etks.online.common.domain.AppMetaData;
import ae.pcfc.etks.online.common.vo.AppMetaDataDetailVO;
import ae.pcfc.etks.online.common.vo.LabelVO;
import ae.pcfc.etks.online.common.vo.WorkflowRequestSearchCriteriaVO;
import ae.pcfc.etks.online.common.vo.WorkflowRequestVO;

public interface AppMetaDataDAO {
	
	/**
	 * add
	 * Method to create AppMetaData record in DB
	 * @param appMetaData
	 * void
	 */
	public void add(AppMetaData appMetaData);
	
	/**
	 * findByPrimaryKey
	 * Method to find the AppMetaData domain object by primary Key 
	 * @param id String
	 * @return
	 * AppMetaData
	 */
	public AppMetaData findByPrimaryKey(String id);
	
	/**
	 * findByPrimaryKeyProcessAndStepCode
	 * Method to find the AppMetaData by Primarykey, Process and Step Code
	 * @param id	String
	 * @param processCode	String
	 * @param processStepCode	String
	 * @return
	 * AppMetaData
	 */
	public AppMetaData findByPrimaryKeyProcessAndStepCode(String id, String processCode, String processStepCode);
	
	/**
	 * update
	 * Method to update the AppMetaData object in the backend
	 * @param appMetaData
	 * void
	 */
	public void update(AppMetaData appMetaData);
	
	/**
	 * getNextApplicationId
	 * Method to find the next application id in the sequence
	 * @return
	 * String
	 */
	public String getNextApplicationId();
	
	/**
	 * findAppMetaDataByUserId
	 * Method to find the AppMetaData objects belonging to a User by UserId
	 * @param id
	 * @return
	 * List<AppMetaData>
	 */
	public List<AppMetaData> findAppMetaDataByUserId(Long id);
	
	/**
	 * findByClientRefNo
	 * Method to find the AppMetadata by ClientRefno
	 * @param refNo String
	 * @return
	 * AppMetaData
	 */
	public AppMetaData findByClientRefNo(String refNo);
	
	/**
	 * findCompletedAppMetaDataByUserId
	 * Method to the Completed Application Requests of an user
	 * @param id User Id
	 * @return
	 * List<AppMetaData>
	 */
	public List<AppMetaData> findCompletedAppMetaDataByUserId(Long id);
	
	/**
	 * findAppMetaDataByExample
	 * Method to find the AppMetaData objects by providing a sample AppMetaDataDetailVO which contains the filter values for the fields
	 * @param appMetaDataDetailVO
	 * @return
	 * List<AppMetaData>
	 */
	public List<AppMetaData> findAppMetaDataByExample(AppMetaDataDetailVO appMetaDataDetailVO);

	/**
	 * updateStatus
	 * Method to update the status of an application request in english and arabic  
	 * @param applicationId
	 * @param statusEn
	 * @param statusAr
	 * void
	 */
	public void updateStatus(String applicationId, String statusEn,String statusAr);

	/**
	 * findAppMetaDataByUserName
	 * Method to find AppMetaData objects of an User by Username
	 * @param strUserName String
	 * @return
	 * List<AppMetaData>
	 */
	public List<AppMetaData> findAppMetaDataByUserName(String strUserName);

	public List<WorkflowRequestVO> findWorkflowRequests(WorkflowRequestSearchCriteriaVO searchCriteria);

/*	public List<AppMetaData> findCompletedAppMetaDataByUserId(AppMetaDataDetailVO appMetaDataDetailVO);
*/
	/*public List<AppMetaData> findApplicationRequestsByProcessCode(WFProcessType processType);

	public List<AppMetaData> findApplicationRequestsByInitiator(String username);

	public List<AppMetaData> findApplicationRequestsByApplicationDate(String date);*/
	
	public List<LabelVO> searchRequestStatus(String searchString);
	
}
